<template>
  <div id="app">
    <!-- 路由占位符 -->
    <router-view v-slot="props">
      <keep-alive include="home">
        <component :is="props.Component"></component>
      </keep-alive>
    </router-view>
    <tabbar v-show="!route.meta.hideTabbar" />
    <loading v-if="showLoading" />
  </div>
</template>

<script setup>
import tabbar from "@/components/tabbar/tabbar.vue"
import { useRoute } from "vue-router"

import loading from "@/components/loading/loading.vue"
import { useMainStore } from "@/stores/modules/main"
import { storeToRefs } from "pinia"

const mainStore = useMainStore()
const { showLoading } = storeToRefs(mainStore)

// 获取当前路由的参数
const route = useRoute()
</script>

<style scoped></style>
